<p style="text-align: center; word-wrap: break-word; font-size: 20px">
    Отчёт по резьбе
</p>
<p>Средний шаг {{middle_step}} {{unit}}</p>
<p>Максимальное отклонение {{max_accumulated_error}} {{unit}}</p>
<p>Минимальное отклонение {{min_accumulated_error}} {{unit}}</p>

![](data:image/png;base64,{{first(imgs)}}){ width=100% }

<table width="100%">
<tr>
<th valign=top>
<table style="border-collapse:collapse;" width="100%" border="1px">
  <tr>
    <th scope="col">№</th>
    <th scope="col">Шаг ({{unit}})</th>
    <th scope="col">Позиция шага ({{unit}})</th>
    <th scope="col">Накопительная ошибка шага ({{unit}})</th>
  </tr>
  {% for data in main_data %}
  <tr>
    <th scope="col">{{data.number}}</th>
    {% if data.is_distace_cell_red == "true" %}
    <th scope="col" bgcolor = "red"> {{data.distance}} </th>
    {% else %}
    <th scope="col"> {{data.distance}} </th>
    {% endif %}>
    <th scope="col">{{data.distance_sum}}</th>
    {% if data.is_current_sum_error_cell_red == "true" %}
    <th scope="col" bgcolor = "red"> {{data.current_sum}} </th>
    {% else %}
    <th scope="col"> {{data.current_sum}} </th>
    {% endif %}>
  </tr>
  {% endfor %}
</th>
</tr>
</table>
